package com.kgis.fm.model.system;



/**
 * 用户或角色拥有的授权 - 权限
 * 
 * @author Gonglin
 */
public class Authorization {
	private int authorizationId;
	private int roleId;
	private int userId;
	private int permissionId;
	private int eno;
	private int eid;
	private int value; //权限类型，缺省为可查看。可选择，可修改，可查看
	private String contraintParam;
	private String tableName;
	private String idFieldName;
	private String javaFilter;
//	private GeometrySpriteRule gsRule;
	
	public String getIdFieldName() {
		return idFieldName;
	}
	public void setIdFieldName(String idFieldName) {
		this.idFieldName = idFieldName;
	}
	public String getTableName() {
		return tableName;
	}
	public void setTableName(String tableName) {
		this.tableName = tableName;
	}
	public int getAuthorizationId() {
		return authorizationId;
	}
	public void setAuthorizationId(int authorizationId) {
		this.authorizationId = authorizationId;
	}
	public int getRoleId() {
		return roleId;
	}
	public void setRoleId(int roleId) {
		this.roleId = roleId;
	}
	public int getUserId() {
		return userId;
	}
	public void setUserId(int userId) {
		this.userId = userId;
	}
	public int getPermissionId() {
		return permissionId;
	}
	public void setPermissionId(int permissionId) {
		this.permissionId = permissionId;
	}
	public int getEno() {
		return eno;
	}
	public void setEno(int eno) {
		this.eno = eno;
	}
	public int getEid() {
		return eid;
	}
	public void setEid(int eid) {
		this.eid = eid;
	}
	public int getValue() {
		return value;
	}
	public void setValue(int value) {
		this.value = value;
	}
	public String getContraintParam() {
		return contraintParam;
	}
	public void setContraintParam(String contraintParam) {
		this.contraintParam = contraintParam;
	}
	
	public String getJavaFilter() {
		return javaFilter;
	}
	public void setJavaFilter(String javaFilter) {
		this.javaFilter = javaFilter;
	}
	
	@Override
	public String toString() {
		return "Authorization [authorizationId=" + authorizationId
				+ ", contraintParam=" + contraintParam + ", eid=" + eid
				+ ", eno=" + eno + ", idFieldName=" + idFieldName
				+ ", javaFilter=" + javaFilter + ", permissionId="
				+ permissionId + ", roleId=" + roleId + ", tableName="
				+ tableName + ", userId=" + userId + ", value=" + value + "]";
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + authorizationId;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Authorization other = (Authorization) obj;
		if (authorizationId != other.authorizationId)
			return false;
		return true;
	}
}
